/*
 * ProgramStep.h
 *
 *  Created on: Oct 25, 2012
 *      Author: root
 */

#ifndef PROGRAMSTEP_H_
#define PROGRAMSTEP_H_

#define MAX_ARGS 2
#define MAX_STEPS 30
typedef enum
{
	SETWATERLEVEL,
	WAITFORCORRECTWATERLEVEL,
	SETTEMPERATURE,
	WAITFORCORRECTTEMPERATURE,
	FLUSHTRAY,
	MOTORSTART,
	MOTORSTOP,
	WAIT,
	REPEAT,
	STOP
} ProgramCommand;

union ProgramArgument;

typedef struct
{
  ProgramCommand cmd;
  ProgramArgument *argument[MAX_ARGS];
} ProgramStep;

class Program
{
public:
	ProgramStep steps[MAX_STEPS];
};

union ProgramArgument
{
	unsigned int ui;
	Program *program;
	Direction d;
};

#endif /* PROGRAMSTEP_H_ */
